<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <?php
        //scandir 返回一个数组或者false
        $path="c:\\";
       $floder= scandir($path);
       if($floder){
           foreach($floder as $k=>$v){
               echo "<br/>".$k. "-->".$v;
               if(is_dir($path.$v)){
                   echo "  是目录<hr/>";
                   $f= scandir($path.$v);
                    foreach($f as $k1=>$v1){
                        echo "<br/> ".$v1 ; 
                    }
                       
                   
               
                   
               }else{
                   echo "  是文件";
               }
               
           }
       }
        ?>
    </body>
</html>
